package thread;

/**
 * Created with IntelliJ IDEA.
 * Description:  创建thread方法一
 * User: LXW
 * Date: 2022-03-21
 * Time: 21:21
 */
class MyThread extends Thread {
    @Override
    public void run() {
        System.out.println("hello thread");
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
public class Demo {

    public static void main(String[] args) {
        Thread t = new MyThread();
        t.start();
    }
}
